Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate one-page CLI reference document #64

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Conversation

amisevsk
Copy link
Contributor

@amisevsk amisevsk commented Mar 5, 2024

Description

Instead of generating a markdown file per CLI command, collapse all commands into a single markdown document with customizable front matter (currently, just a heading). With this change, generating CLI reference docs is done by calling docs/src/docs/cli/generate.sh (which has the added bonus of being callable from anywhere)

In addition, add PR checks for

  • Generated CLI docs are up to date -- if not fail and prompt submitter to regenerate
  • No trailing whitespace on lines in files -- list files with trailing whitespace if present

In looking at the diff, you may want to ignore the "trim trailing whitespace" commit, as it litters the changes significantly.

@amisevsk amisevsk requested review from gorkem and javisperez March 5, 2024 18:01
@amisevsk amisevsk force-pushed the gen-one-page-cli-doc branch from 4597169 to 414d5c4 Compare March 5, 2024 19:20
amisevsk added 2 commits March 5, 2024 14:34
Add script docs/src/docs/cli/generate.sh to generate a one-page CLI
reference document rather than a markdown file per CLI command.

This file is formed by concatenating per-command markdown docs with the
"See also" section stripped. The top-level introduction for the document
can be customized via the cli-reference-header.md file.
@amisevsk amisevsk force-pushed the gen-one-page-cli-doc branch 2 times, most recently from 0ffd736 to 0cd6990 Compare March 5, 2024 19:59
amisevsk added 3 commits March 5, 2024 16:33
Add PR check to block merging changes with trailing whitespace on lines.
Check skips binary files, svg files, and anything within the docs/
directory.
By default, go build is outputting a file named kitops, which is
untracked in the repository. This breaks later PR checks that check for
autogenerated files, etc. since it makes the repository state dirty.
@amisevsk amisevsk force-pushed the gen-one-page-cli-doc branch from 0cd6990 to 3611ad5 Compare March 5, 2024 21:33
@amisevsk amisevsk merged commit 2d45713 into main Mar 5, 2024
1 check passed
@amisevsk amisevsk deleted the gen-one-page-cli-doc branch March 5, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants